(C) 1996 AROS - The Amiga Replacement OS


NAME
#include <proto/dos.h>
LONG ParsePattern()
SYNOPSIS
STRPTR Source
STRPTR Dest
LONG DestLength

LOCATION
In DOSBase at offset 140
FUNCTION
Takes a pattern containing wildcards and transforms it into some intermediate representation for use with the MathPattern() function. The intermediate representation is longer but generally a buffer size of 2*(strlen(Source)+1) is enough. Nevertheless you should check the returncode to be sure that everything went fine.

INPUTS
Source
Pattern describing the kind of strings that match. Possible tokens are:
x
The following character or item is repeaded 0 or more times.
non
NUL character.
c
Matches one of multiple strings.
x
This item matches if the item x doesn't match. (a) - Parens
a
z] - Matches a single character out of the set.
a
z] - Matches a single non-NUL character not in the set.
c
Escapes the following character. * - Same as #?, but optional.
Dest
Buffer for the destination.
DestLength
Size of the buffer.
RESULT
1 - There are wildcards in the pattern (it might match more than one string). 0 - No wildcards in it, all went fine. -1 - An error happened. IoErr() gives additional information in that case.

NOTES
EXAMPLE
BUGS
SEE ALSO
INTERNALS
HISTORY
27.01.1997 ldp
Polish
09.12.1996 aros
Added empty templates for all missing functions

Moved #include's into first column

24.10.1996 aros
Use the official AROS macros over the __AROS versions.
11.09.1996 digulla
A couple of new DOS functions from M. Fleischer